 $.validator.addMethod("hgbm",function(value,element,params){  
            var hgbm = /^\d{6}[\w\d\u4e00-\u9fa5]{1,4}$/;  
            return this.optional(element)||(hgbm.test(value));  
        },"海关编码前6位只能是数字");  
var enterpriseValidate = {
	rules: {
		companyname: "required",
		organizationcode: "required",
		contactpoint: "required",
		contactnumber: "required",
		customscode: {
			required: true,
			hgbm: true,
			minlength: 10,
			maxlength: 10	
		},
		customscodetype: "required",
		appliedcompany: "required",
		applyby: "required"
		/*versionid: {
			required: true,
			digits: true
		},*/
		//subcode: "required"
	},
	messages: {
		companyname: "请填写企业名称",
		organizationcode: "请填写组织机构代码",
		contactpoint: "请填写联系人",
		contactnumber: "请填写联系人电话/手机",
		customscode: {
			required: "请填写企业海关编号",
			hgbm: "海关编码前6位只能是数字",
			minlength: "海关编码长度为10",
			maxlength: "海关编码长度为10"
		},
		customscodetype: "请填写主管海关代码",
		appliedcompany: "请填写申请企业代码",
		applyby: "请填写申报人"
		/*versionid: {
			required: "请填写版本号",
			digits: "版本号为数字"
		},*/
		//subcode: "请填写子平台代码",
		
	}
};